/*!
 * Bootstrap v3.3.5 (http://getbootstrap.com)
 * Copyright 2011-2015 Twitter, Inc.
 * Licensed under the MIT license
 */
!(function ($) {
})($);
jQuery = $;
if ("undefined" == typeof jQuery) throw new Error("Bootstrap's JavaScript requires jQuery");
+
    function (a) {
        "use strict";
        var b = a.fn.jquery.split(" ")[0].split(".");
        if (b[0] < 2 && b[1] < 9 || 1 == b[0] && 9 == b[1] && b[2] < 1) throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher")
    }(jQuery),
    +
        function (a) {
            "use strict";

            function b(b, d) {
                return this.each(function () {
                    var e = a(this),
                        f = e.data("bs.modal"),
                        g = a.extend({},
                            c.DEFAULTS, e.data(), "object" == typeof b && b);
                    f || e.data("bs.modal", f = new c(this, g)),
                        "string" == typeof b ? f[b](d) : g.show && f.show(d)
                })
            }

            var c = function (b, c) {
                this.options = c,
                    this.$body = a(document.body),
                    this.$element = a(b),
                    this.$dialog = this.$element.find(".modal-dialog"),
                    this.$backdrop = null,
                    this.isShown = null,
                    this.originalBodyPad = null,
                    this.scrollbarWidth = 0,
                    this.ignoreBackdropClick = !1,
                this.options.remote && this.$element.find(".modal-content").load(this.options.remote, a.proxy(function () {
                        this.$element.trigger("loaded.bs.modal")
                    },
                    this))
            };
            c.VERSION = "3.3.5",
                c.TRANSITION_DURATION = 300,
                c.BACKDROP_TRANSITION_DURATION = 150,
                c.DEFAULTS = {
                    backdrop: !0,
                    keyboard: !0,
                    show: !0
                },
                c.prototype.toggle = function (a) {
                    return this.isShown ? this.hide() : this.show(a)
                },
                c.prototype.show = function (b) {
                    var d = this,
                        e = a.Event("show.bs.modal", {
                            relatedTarget: b
                        });
                    this.$element.trigger(e),
                    this.isShown || e.isDefaultPrevented() || (this.isShown = !0, this.checkScrollbar(), this.setScrollbar(), this.$body.addClass("modal-open"), this.escape(), this.resize(), this.$element.on("click.dismiss.bs.modal", '[data-dismiss="modal"]', a.proxy(this.hide, this)), this.$dialog.on("mousedown.dismiss.bs.modal",
                        function () {
                            d.$element.one("mouseup.dismiss.bs.modal",
                                function (b) {
                                    a(b.target).is(d.$element) && (d.ignoreBackdropClick = !0)
                                })
                        }), this.backdrop(function () {
                        var e = a.support.transition && d.$element.hasClass("fade");
                        d.$element.parent().length || d.$element.appendTo(d.$body),
                            d.$element.show().scrollTop(0),
                            d.adjustDialog(),
                        e && d.$element[0].offsetWidth,
                            d.$element.addClass("in"),
                            d.enforceFocus();
                        var f = a.Event("shown.bs.modal", {
                            relatedTarget: b
                        });
                        e ? d.$dialog.one("bsTransitionEnd",
                            function () {
                                d.$element.trigger("focus").trigger(f)
                            }).emulateTransitionEnd(c.TRANSITION_DURATION) : d.$element.trigger("focus").trigger(f)
                    }))
                },
                c.prototype.hide = function (b) {
                    b && b.preventDefault(),
                        b = a.Event("hide.bs.modal"),
                        this.$element.trigger(b),
                    this.isShown && !b.isDefaultPrevented() && (this.isShown = !1, this.escape(), this.resize(), a(document).off("focusin.bs.modal"), this.$element.removeClass("in").off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"), this.$dialog.off("mousedown.dismiss.bs.modal"), a.support.transition && this.$element.hasClass("fade") ? this.$element.one("bsTransitionEnd", a.proxy(this.hideModal, this)).emulateTransitionEnd(c.TRANSITION_DURATION) : this.hideModal())
                },
                c.prototype.enforceFocus = function () {
                    a(document).off("focusin.bs.modal").on("focusin.bs.modal", a.proxy(function (a) {
                            this.$element[0] === a.target || this.$element.has(a.target).length || this.$element.trigger("focus")
                        },
                        this))
                },
                c.prototype.escape = function () {
                    this.isShown && this.options.keyboard ? this.$element.on("keydown.dismiss.bs.modal", a.proxy(function (a) {
                            27 == a.which && this.hide()
                        },
                        this)) : this.isShown || this.$element.off("keydown.dismiss.bs.modal")
                },
                c.prototype.resize = function () {
                    this.isShown ? a(window).on("resize.bs.modal", a.proxy(this.handleUpdate, this)) : a(window).off("resize.bs.modal")
                },
                c.prototype.hideModal = function () {
                    var a = this;
                    this.$element.hide(),
                        this.backdrop(function () {
                            a.$body.removeClass("modal-open"),
                                a.resetAdjustments(),
                                a.resetScrollbar(),
                                a.$element.trigger("hidden.bs.modal")
                        })
                },
                c.prototype.removeBackdrop = function () {
                    this.$backdrop && this.$backdrop.remove(),
                        this.$backdrop = null
                },
                c.prototype.backdrop = function (b) {
                    var d = this,
                        e = this.$element.hasClass("fade") ? "fade" : "";
                    if (this.isShown && this.options.backdrop) {
                        var f = a.support.transition && e;
                        if (this.$backdrop = a(document.createElement("div")).addClass("modal-backdrop " + e).appendTo(this.$body), this.$element.on("click.dismiss.bs.modal", a.proxy(function (a) {
                                return this.ignoreBackdropClick ? void (this.ignoreBackdropClick = !1) : void (a.target === a.currentTarget && ("static" == this.options.backdrop ? this.$element[0].focus() : this.hide()))
                            },
                            this)), f && this.$backdrop[0].offsetWidth, this.$backdrop.addClass("in"), !b) return;
                        f ? this.$backdrop.one("bsTransitionEnd", b).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION) : b()
                    } else if (!this.isShown && this.$backdrop) {
                        this.$backdrop.removeClass("in");
                        var g = function () {
                            d.removeBackdrop(),
                            b && b()
                        };
                        a.support.transition && this.$element.hasClass("fade") ? this.$backdrop.one("bsTransitionEnd", g).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION) : g()
                    } else b && b()
                },
                c.prototype.handleUpdate = function () {
                    this.adjustDialog()
                },
                c.prototype.adjustDialog = function () {
                    var a = this.$element[0].scrollHeight > document.documentElement.clientHeight;
                    this.$element.css({
                        paddingLeft: !this.bodyIsOverflowing && a ? this.scrollbarWidth : "",
                        paddingRight: this.bodyIsOverflowing && !a ? this.scrollbarWidth : ""
                    })
                },
                c.prototype.resetAdjustments = function () {
                    this.$element.css({
                        paddingLeft: "",
                        paddingRight: ""
                    })
                },
                c.prototype.checkScrollbar = function () {
                    var a = window.innerWidth;
                    if (!a) {
                        var b = document.documentElement.getBoundingClientRect();
                        a = b.right - Math.abs(b.left)
                    }
                    this.bodyIsOverflowing = document.body.clientWidth < a,
                        this.scrollbarWidth = this.measureScrollbar()
                },
                c.prototype.setScrollbar = function () {
                    var a = parseInt(this.$body.css("padding-right") || 0, 10);
                    this.originalBodyPad = document.body.style.paddingRight || "",
                    this.bodyIsOverflowing && this.$body.css("padding-right", a + this.scrollbarWidth)
                },
                c.prototype.resetScrollbar = function () {
                    this.$body.css("padding-right", this.originalBodyPad)
                },
                c.prototype.measureScrollbar = function () {
                    var a = document.createElement("div");
                    a.className = "modal-scrollbar-measure",
                        this.$body.append(a);
                    var b = a.offsetWidth - a.clientWidth;
                    return this.$body[0].removeChild(a),
                        b
                };
            var d = a.fn.modal;
            a.fn.modal = b,
                a.fn.modal.Constructor = c,
                a.fn.modal.noConflict = function () {
                    return a.fn.modal = d,
                        this
                },
                a(document).on("click.bs.modal.data-api", '[data-toggle="modal"]',
                    function (c) {
                        var d = a(this),
                            e = d.attr("href"),
                            f = a(d.attr("data-target") || e && e.replace(/.*(?=#[^\s]+$)/, "")),
                            g = f.data("bs.modal") ? "toggle" : a.extend({
                                    remote: !/#/.test(e) && e
                                },
                                f.data(), d.data());
                        d.is("a") && c.preventDefault(),
                            f.one("show.bs.modal",
                                function (a) {
                                    a.isDefaultPrevented() || f.one("hidden.bs.modal",
                                        function () {
                                            d.is(":visible") && d.trigger("focus")
                                        })
                                }),
                            b.call(f, g, this)
                    })
        }(jQuery);

